package top.soulblack.purchasesale.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.soulblack.purchasesale.model.PurchaseForm;
import top.soulblack.purchasesale.model.VO.PurchaseFormVO;


import java.util.List;

/**
 * create by 小川
 */
@Mapper
public interface PurchaseFormMapper {

    int deleteByPrimaryKey(String name);

    int insert(PurchaseForm record);

    int insertSelective(PurchaseForm record);

    PurchaseForm selectByPrimaryKey(Integer purchaseId);

    int updateByPrimaryKeySelective(PurchaseForm record);

    int updateByPrimaryKey(PurchaseForm record);

    List<PurchaseFormVO> selectClear();

    List<PurchaseFormVO> selectForUnit();

    List<PurchaseFormVO> selectClearByTime(@Param("startTime") String startTime,
                                           @Param("endTime") String endTime);

    @Select("select * from purchase_form")
    List<PurchaseForm> selectAll();
}
